package plugin.demo.runner.apt.boot.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import plugin.demo.runner.apt.boot.annotations.ElCondition;
import plugin.demo.runner.apt.boot.bean.Admin;
import plugin.demo.runner.apt.config.AptRunnerConfigurationProperties;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/5/26 下午4:44
 * @UpdateDate:
 * @Description:
 */
//@ElCondition({
//        "#environment.getProperty('user.inject.ApplicationEnvironment2','false').equals('true')",
//        "#beanFactory.getBean(T(plugin.demo.runner.apt.AptRunnerApplication)) != null"
//})
public class ApplicationEnvironment2 {

    @Autowired
    AptRunnerConfigurationProperties aptRunnerConfigurationProperties;

    @ElCondition(value = "${java.lang.System.getProperty('user.inject').equals('true')}")
    @Bean
    public Admin admin(){
        return new Admin();
    }

}
